<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.common.enums.PtXlbType"%>
<%@page import="com.blockchain.console.servlets.financial.ptzjgl.PtxlbjyjlList"%>
<%@page import="com.blockchain.console.servlets.financial.AbstractFinancialServlet"%>
<%@page import="com.blockchain.console.servlets.financial.ptzjgl.PtzjglList"%>
<%@page import="com.blockchain.console.service.financial.entity.PtzjglRecord"%>
<%@page import="com.blockchain.console.service.financial.entity.Ptzjgl"%>
<%@page import="com.blockchain.common.enums.PlatformFundType"%>
<html>
<head>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
</head>
<%
	CURRENT_CATEGORY = "CWGL";
	CURRENT_SUB_CATEGORY = "PTXLBGL";
	PagingResult<PtzjglRecord> result = (PagingResult<PtzjglRecord>) request
			.getAttribute("result");
	int bid=(int)request.getAttribute("bid");
%>
<body>
	<%@include file="/WEB-INF/include/header.jsp"%>
	<div class="w_main">
		<div class="main clearfix">
			<div class="wrap">
				<div class="r_main">
					<form action="<%=controller.getURI(request, PtxlbjyjlList.class) %>" name="form1" method="post" id="searchForm">
						<input type="hidden" name="bid" value="<%=bid%>">
						<div class="home_main">
							<div class="box box1 mb15">
								<div class="atil">
									<h3>平台虚拟币账户交易记录</h3>
								</div>
							</div>
							<div class="box box1 mb15">
								<div class="con">
								 <div class="admin_input admin_pb">
           							<div class="table">	
										<p>
											<span>类型明细：</span>
											<select name="type" class="yhgl_sel" >
						                    	<option>请选择</option>
						                         <%for(PtXlbType type:PtXlbType.values())
						                            {
						                         %>
						                          <option value="<%=type.name()%>" <%if(type.name().equals(request.getParameter("type"))){ %> selected="selected" <%} %>><%=type.getName() %></option>
						                         <%} %>
						                    </select>
						                </p>
						                <p>
											<span>姓名：</span>
											<input type="text" name="xm" class="yhgl_input" value="<%StringHelper.filterHTML(out, request.getParameter("xm")); %>"/>
						                </p>
						                <p>
											<span>用户名：</span>
											<input type="text" name="userName" class="yhgl_input" value="<%StringHelper.filterHTML(out, request.getParameter("userName")); %>"/>
						                </p>
						                <p>
											<span>时间：</span>
											<input type="text" name="startPayTime" id="datepicker1" readonly="readonly" class="yhgl_input date" value="<%StringHelper.filterHTML(out, request.getParameter("startPayTime")); %>"/>至
											<input type="text" name="endPayTime" id="datepicker2" readonly="readonly" value="<%StringHelper.filterHTML(out, request.getParameter("endPayTime")); %>" class="yhgl_input date" />
										</p>
								</div>
								<div class="clear"></div>   
								<div class="mt10">   
                   				<input name="search" type="submit" class="btn2 mr10" value="搜索" />
                   				</div> 
                   				<div class="clear"></div>           
								</div>
								</div>
							</div>
							<table width="100%" border="0" cellspacing="0" cellpadding="3" class="yhgl_table tc">
								<tr class="hsbg">
									<td>序号</td>
									<td>时间</td>
									<td>姓名</td>
									<td>用户名</td>
									<td>类型明细</td>
									<td>收入</td>
									<td>支出</td>
									<td>结余</td>
									<td>备注</td>
								</tr>
								<%
									PtzjglRecord[] records=result.getItems();
									if(records!=null)
									{
										int i=1;
										for(PtzjglRecord record:records)
										{
											if(record==null)
											{
												continue;
											}
								%>
								<tr class="dhsbg">
									<td><%=i++ %></td>
									<td><%=DateTimeParser.format(record.playTime,"yyyy-MM-dd HH:mm:ss") %></td>
									<td><%if(!StringHelper.isEmpty(record.xm)){%><%StringHelper.filterHTML(out, record.xm); %><%}else{ %>--<%} %></td>
									<td><%if(!StringHelper.isEmpty(record.loginName)){%><%StringHelper.filterHTML(out, record.loginName); %><%}else{ %>--<%} %></td>
									<td><%if(record.ptXlbType!=null){%><%=record.ptXlbType.getName() %><%} %></td>
									<td><%=Formater.formatAmount(record.income) %></td>
									<td><%=Formater.formatAmount(record.replay) %></td>
									<td><%=Formater.formatAmount(record.remain) %></td>
									<td title="<%StringHelper.filterHTML(out, record.remark);%>"><%StringHelper.filterHTML(out, StringHelper.truncation(record.remark, 15)); %></td>
								</tr>
								<%}}else{ %>
								<tr><td colspan="7"></td></tr>
								<%} %>
							</table>
							<%AbstractFinancialServlet.rendPagingResult(out, result); %>
							<div class="box2 clearfix"></div>
						</div>
					</form>
				</div>
			</div>
			<%@include file="/WEB-INF/include/left.jsp"%>
		</div>
	</div>
	<%@include file="/WEB-INF/include/footer.jsp"%>
	<%@include file="/WEB-INF/include/script.jsp"%>
	<script type="text/javascript"
		src="<%=controller.getStaticPath(request)%>/js/validation.js"></script>
	<%@include file="/WEB-INF/include/datepicker.jsp"%>
	<script type="text/javascript">
		$(function() {
			$("#datepicker1").datepicker({inline: true});
		    $('#datepicker1').datepicker('option', {dateFormat:'yy-mm-dd'});
		    $("#datepicker2").datepicker({inline: true});
		    $('#datepicker2').datepicker('option', {dateFormat:'yy-mm-dd'});
		    $("#datepicker1").datepicker("setDate", "<%StringHelper.filterHTML(out, request.getParameter("startPayTime"));%>");
		    $("#datepicker2").datepicker("setDate", "<%StringHelper.filterHTML(out, request.getParameter("endPayTime"));%>");
		});
	</script>
</body>
</html>